<?php
/** 二次验证 **/
include '../includes/common.php';
header("Content-Type: text/html;charset=utf-8");
if ($conf['safe_switch'] == 0){
    exit("<script>alert('{$conf['safe_info']}');window.location.href='./';</script>");
}
if (empty($userrow['safecode'])){
    @header('Content-Type: text/html; charset=UTF-8');
    exit("<script language='javascript'>alert('你还没有设置安全码！');window.location.href='userinfo.php';</script>");
}
if ($islogin3 == 1){
    @header('Content-Type: text/html; charset=UTF-8');
    exit("<script language='javascript'>alert('已经验证过啦！');window.location.href='./';</script>");
}
?>
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
  <meta name="description" content="<?php echo $conf['copyright']?>"/>
  <meta name="author" content="<?php echo $conf['web_desc']?>"/>
  <title><?php echo $conf['web_name']?>|商户安全验证</title>
  <link rel="icon" href="../favicon.ico" type="image/x-icon">
  <link href="/user/kuyun/plugins/vectormap/jquery-jvectormap-2.0.2.css" rel="stylesheet"/>
  <link href="/user/kuyun/plugins/simplebar/css/simplebar.css" rel="stylesheet"/>
  <link href="/user/kuyun/css/bootstrap.min.css" rel="stylesheet"/>
  <link href="/user/kuyun/css/animate.css" rel="stylesheet" type="text/css"/>
  <link href="/user/kuyun/css/icons.css" rel="stylesheet" type="text/css"/>
  <link href="/user/kuyun/css/sidebar-menu.css" rel="stylesheet"/>
  <link href="/user/kuyun/css/app-style.css" rel="stylesheet"/>
  <link rel="stylesheet" href="/user/kuyun/bootstrap.css" type="text/css" />
  <link rel="stylesheet" href="/user/kuyun/layer/skin/layer.css">
 <script type="text/javascript" src="/user/kuyun/Js/jquery-1.7.2.min.js"></script>
 <script src="/user/kuyun/lib/layui/layui.js" charset="utf-8"></script>
</head>
<body>
   <div id="pageloader-overlay" class="visible incoming"><div class="loader-wrapper-outer"><div class="loader-wrapper-inner" ><div class="loader"></div></div></div></div>
<!-- Start wrapper-->
 <div id="wrapper">

    <div class="card card-authentication1 mx-auto my-5 animated bounceInDown">
        <div class="user-lock rounded-top bg-facebook">
              <div class="user-lock-img">
                  <img src="/user/kuyun/images/qq.jpg" alt="user avatar">
              </div>
           </div>
          <div class="card-body">
             <h4 class="text-center mt-5 py-2">商户安全验证</h4>
            <form class="mt-3 mb-1">
              <div class="form-group">
                <label for="exampleInputpassword" class="sr-only">请输入您的安全码！</label>
                <input type="password" name="safecode" class="form-control" placeholder="请输入您的安全码！">
              </div>
              <button type="submit" class="btn bg-facebook text-white btn-block waves-effect waves-light mt-2" id="tosafecode" ><i class="icon-lock-open"></i> 验证登入 </button>
            </form>
          </div>
         </div>
    
     
    <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>
    </div>
   
<script src="https://template.down.swap.wang/ui/angulr_2.0.1/bower_components/jquery/dist/jquery.min.js"></script>
<script src="../assets/layer/layer.js"></script>
 <script>
    $(function () {
        $("#tosafecode").click(function(){
            var safecode=$("input[name='safecode']").val();
            if(safecode==''){layer.alert('请填写安全码！');return false;}
            var load = layer.load(2, {shade:[0.1,'#fff']});
            $.ajax({
                type : "POST",
                url : "ajax2.php?act=tosafecode",
                data : {safecode:safecode},
                dataType : 'json',
                success : function(data) {
                    layer.close(load);
                    if(data.code == 1){
                        layer.alert('验证成功！');
                        window.location.href='./';
                    }else{ 
                     layer.alert(data.msg);
                    }
                }
            });
        });
    });
</script> 
 <?php include './foot.php';?>
